<template>
  <div>
    <h3>child2 --- {{ age }}</h3>
  </div>
</template>

<script>
export default {
  props: ['age'],
  created() {
    this.$eventBus.$on('age', value => {
      console.log(value)
    })
  },
  beforeDestroy() {
    this.$eventBus.$off('age')
  }
}
</script>

<style lang="scss" scoped></style>
